package innerclass.demo;

/**
 * @author: knowno
 * @create: 2024-09-10 09:25
 * @Version 1.0
 **/
public class OuterClass2 {
    public void oc2() {
        //方法内部，创建一个类，这个类我们成为局部内部类
        class InnerClass {
            public void ic() {
                System.out.println("ic");
            }
        }
        //外部方法中
        InnerClass innerClass = new InnerClass();
        innerClass.ic();
    }

    public static void main(String[] args) {
        OuterClass2 outClass2 = new OuterClass2();
        outClass2.oc2();
    }
}
